﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Kiosk.UserControls
{
    /// <summary>
    /// Interaction logic for LetterButton.xaml
    /// </summary>
    public partial class LetterButton : UserControl
    {
        public LetterButton()
        {
            InitializeComponent();
        }

        char letter = 'X';
        /// <summary>
        /// The letter to be displayed
        /// </summary>
        public char Letter
        {
            get
            {
                return letter;
            }
            set
            {
                letter = value;
            }
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            FormattedText ft = new FormattedText(this.Letter.ToString(), System.Globalization.CultureInfo.CurrentCulture
                , FlowDirection.LeftToRight, 
                new Typeface(new FontFamily("Arial Rounded MT Bold"), FontStyles.Normal, FontWeights.UltraBold, FontStretches.SemiExpanded)
                , 120, Brushes.Black);
            Geometry textGeo = ft.BuildGeometry(new Point(0, 0));
            pthLetter.Data = textGeo;
            pthHighlight.Data = textGeo;
            

        }
    }
}
